package com.example.msi.loginproject605xh.model;

import com.example.msi.loginproject605xh.cjyListener;
import com.example.msi.loginproject605xh.cjyiface;

import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import retrofit2.converter.scalars.ScalarsConverterFactory;

/**
 * Created by M S I on 2017/5/30.
 */

public class Denglumodel <T>implements cjyiface {
    private Retrofit retrofit;

    private static final String BASE_URL="http://amicool.neusoft.edu.cn/";

    public Denglumodel(String type) {
        if (type.equals("gson")){
               retrofit=new Retrofit
                       .Builder()
                       .baseUrl(BASE_URL)
                       .addConverterFactory(GsonConverterFactory.create())
                       .build();
        }
else {
            retrofit=new Retrofit
                    .Builder()
                    .baseUrl(BASE_URL)
                    .addConverterFactory(ScalarsConverterFactory.create())
                    .build();
        }
    }

    @Override
    public void reg(String u, String p, String t, int roleid, String emain, cjyListener l) {

    }

    @Override
    public void getDetail(String mod, int id, String s, cjyListener l) {

    }

    @Override
    public void getList(String mod, int page, String s, cjyListener l) {

    }

    @Override
    public void login(String u, String p, cjyListener l) {

    }
}
